/**
 * 
 */
package cn.com.qingz.modules.system.service;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.UnknownHostException;

import javax.servlet.ServletContext;

import org.springframework.web.multipart.MultipartFile;

/**
 * 基础服务
 * @author jiulong.hu
 */
public interface BasicService {

    /**
     * 系统初始化
     * @param application
     */
    public void doInitApplication(ServletContext application);

    /**
     * 上传文件
     * @param file
     * @throws UnknownHostException
     * @throws IOException
     */
    public String doSaveFile(MultipartFile file) throws UnknownHostException, IOException;

    /**
     * 上传图片文件
     * @param file
     * @return
     * @throws UnknownHostException
     * @throws IOException
     */
    public String doSaveFile(BufferedImage file) throws IOException;

    /**
     * @param filename
     * @throws UnknownHostException
     * @throws IOException
     */
    public boolean doDelFile(String filename) throws IOException;
}
